﻿//创建时间: 2011-1-24
//创建作者: 李 城
//功能说明: 日志操作接口
//最后修改: 2011-1-24
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TRPOP.Common;
using System.Data;

namespace TRPOP.CMS.Plugin
{
    /// <summary>
    /// 日志操作接口
    /// </summary>
    public interface ILog
    {
        /// <summary>
        ///  系统日志 根据异常 记录
        /// </summary>
        /// <param name="ex">异常</param>
        /// <param name="oObjArray">format的数组</param>
        string SysLog(Exception ex, object[] oObjArray);


        /// <summary>
        /// 操作日志
        /// </summary>
        /// <param name="oOperType">操作类型</param>
        /// <param name="oOperObject">操作对象</param>
        /// <param name="oObjArray">format的数组</param>
        string OperLog(LogKeys.OperType oOperType, LogKeys.OperObject oOperObject, object[] oObjArray);

        /// <summary>
        /// 保存日志
        /// </summary>
        /// <param name="Action"></param>
        /// <returns></returns>
        EnumSubmitResult SaveLog(string Action);
        /// <summary>
        /// 保存日志
        /// </summary>
        /// <param name="UserID">用户Id</param>
        /// <param name="UserName">用户名</param>
        /// <param name="IP">IP</param>
        /// <param name="Action"></param>
        /// <param name="ActionURL"></param>
        /// <param name="AddTime"></param>
        /// <returns></returns>
        EnumSubmitResult SaveLog(int UserID, string UserName, string IP, string Action, string ActionURL, DateTime AddTime);

        /// <summary>
        /// 删除 DeleteInfoById
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        EnumSubmitResult DeleteInfoById(int id);

        /// <summary>
        /// 删除 DeleteInfoByIds
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        EnumSubmitResult DeleteInfoByIds(string ids);

        /// <summary>
        /// 自定义列表（无分页） 
        /// </summary>
        /// <param name="topn"></param>
        /// <param name="condition"></param>
        /// <param name="orderby"></param>
        /// <returns></returns>
        DataSet GetListByCondition(int topn, string condition, string orderby);

        /// <summary>
        /// 自定义列表（分页）
        /// </summary>
        /// <param name="pageNumber"></param>
        /// <param name="pageSize"></param>
        /// <param name="condition"></param>
        /// <param name="orderby"></param>
        /// <param name="recordCount"></param>
        /// <returns></returns>
        DataSet GetListByPager(int pageNumber, int pageSize, string condition, string orderby, out int recordCount);
    }
}
